package day7;

public class Fighter extends Plane {
    //弹头数，自重，飞行高度
    private int warhead;
    private double weight, height;

    public Fighter(int warhead, double weight, double height) {
        this.warhead = warhead;
        this.weight = weight;
        this.height = height;
    }

    public void show() {
        System.out.println("战斗机有" + getWarhead() + "枚弹头,自重" + getWeight() + "t，飞行高度" + getHeight());
    }

    public void launch() {
        System.out.println("发射导弹");
    }

    public int getWarhead() {
        return warhead;
    }

    public void setWarhead(int warhead) {
        this.warhead = warhead;
    }

    public double getWeight() {
        return weight;
    }

    public void setWeight(double weight) {
        this.weight = weight;
    }

    public double getHeight() {
        return height;
    }

    public void setHeight(double height) {
        this.height = height;
    }
}